package com.bang.study.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName: Consumer
 * @Desc: TODO
 * @Auther: <Bang>
 * @Date: 2020/05/07 11:23
 * @Version: 1.0
 * @Modified By:
 */
@Component
@Slf4j
@RocketMQMessageListener(consumerGroup = "OrderConsumer3",topic = "ORDER_BOOT_TOPIC")
public class OrderConsumer3  implements RocketMQListener<MessageExt>{



    @Override
    public void onMessage(MessageExt messageExt) {
        String body = new String(messageExt.getBody());
        log.info("OrderConsumer3 Receive message：{} messageExt={}", body, messageExt);
    }
}
